#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/gpu/gpu.hpp>

#include "mcRasterColor.h"

using namespace std;

void testRasterColor(){
	//cv::Mat img = cv::imread("D:/Works/Research/DDMCMC/svn/image/guy.jpg", CV_LOAD_IMAGE_COLOR);
	//cv::imshow("Guy", img);
	//cv::waitKey();

	Raster_Color<uchar> img;
	img.RGB = cv::imread("D:/Works/Research/DDMCMC/svn/image/test2.bmp", CV_LOAD_IMAGE_COLOR);
	cv::cvtColor(img.RGB, img.RGB, CV_BGR2RGB);

	img.convert_RGB_LUV();
	fstream fout;
	fout.open("D:/Works/Research/DDMCMC/svn/testing/rasterColor/data_RGB_opencv.txt", ios::out);
	fout << img.RGB << endl;
	fout.close();

	fout.open("D:/Works/Research/DDMCMC/svn/testing/rasterColor/data_LUV_opencv.txt", ios::out);
	fout << img.LUV << endl;
	fout.close();

}

int main(){
	testRasterColor();

	system("pause");
	return 0;
}
